using System.Text.Json;
using MongoDB.Bson.Serialization.Attributes;

namespace IMServer.Models.Message
{
    public class AddFriendRequest : ReqSystemMessage
    {
        public override string SystemType => "AddFriendRequest";
        
        [BsonElement("description")]
        public string Description { get; set; } = string.Empty;
        

        public override string ToJson()
        {
            var requestData = new
            {
                MessageId,
                SenderId,
                SenderName,
                SenderAvatar,
                ReceiverId,
                Content,
                MessageType,
                SystemType,
                Description
            };
            return JsonSerializer.Serialize(requestData);
        }
    }
}